package components.criteria;

import java.awt.event.InputEvent;

import javax.swing.Timer;

import components.SetupExperiment;

import fr.inria.insitu.noe.Platform;
import fr.inria.insitu.noe.endConditions.AbstractEndCondition;
import fr.inria.insitu.noe.input.AxesEvent;
import fr.lri.swingstates.canvas.Canvas;

public class ImmediateEnd extends AbstractEndCondition {

	protected Canvas canvas;
	
	public ImmediateEnd() {
	}
	
	@Override
	public boolean isReached(AxesEvent e) {
		return true;
	}
	
	@Override
	public boolean isReached(InputEvent e) {
		return true;
	}
	
	@Override
	public boolean isReached(Timer timer, long when) {
		return true;
	}
	
	public void start() {
		
		canvas = ((SetupExperiment)Platform.getExperiment().getSetUp()).getGestureArea();
		
		super.start();
		Platform.getInstance().registerComponent(canvas);
		
	}

	public void stop() {
		super.stop();
	}
	
}
